package org.example.struct.array;

/**
 * @author liyishan
 * @date 2024/8/12 10:24
 * @apiNote
 */

public class Test00771NumJewelsInStones {
    public int numJewelsInStones(String jewels, String stones) {
        int count = 0;
        for (int i = 0; i < stones.length(); i++) {
            if (jewels.indexOf(stones.charAt(i)) != -1) {
                count++;
            }
        }
        return count;
    }
}
